package com.deep.bilibili.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Api(tags = "平台首页")
@Controller
public class HomeController {
    private static Logger logger = LoggerFactory.getLogger(HomeController.class);

    @ApiOperation(value = "默认主页")
    @GetMapping("/")
    public Object home(Model model) {
        model.addAttribute("test", "test");
        return "index";
    }

    @ApiOperation(value = "默认管理首页")
    @GetMapping("/admin")
    public Object admin(Model model) {
        model.addAttribute("test", "test");
        return "admin";
    }

    @GetMapping("/admin/index")
    public Object index(Model model) {
        return "admin";
    }
}
